package com.jp.fm.datacollector;

import java.util.concurrent.TimeUnit;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import com.jp.fm.data.UserAccount;

public class SelChase extends SelParent {

	private WebDriver driver;

	@Before
	public final void setUp() throws Exception {
		this.driver = new FirefoxDriver();
		this.driver.manage().timeouts()
				.implicitlyWait(AllTests.WAIT_TIME_SECONDS, TimeUnit.SECONDS);
	}

	@Test
	public final void testSelChase() throws Exception {

		// Lookup username, password and url
		UserAccount uAcct = UserAccount.findByRunClass(this.getClass()
				.getName());
		String url = uAcct.getAttribute(UserAccount.URL);

		this.driver.get(url);
	}

	@After
	public final void tearDown() throws Exception {
		this.driver.quit();
	}
}
